<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="../base.jsp" %>  
<s:if test="#attr.productId!=null">
	<s:set var="productId1" value="#attr.productId"></s:set>
</s:if>
<s:if test="#attr.productId==null">
	<s:set var="productId" value="#parameters.productId[0]"></s:set>
</s:if>
<sys:genericTag4o 
	id="productDetailDto" 
	methodName="queryProductDetailById" 
	className="com.wxy.controller.taglib.ProductTag">
	<sys:columnTag columnName="productDetailId" columnValue="${param.productDetailId}"/>
</sys:genericTag4o> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>	
<script language="Javascript" src="../../js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script language="Javascript" src="../../js/HtmlBox_4.0/htmlbox.full.js" type="text/javascript"></script>
<script language="Javascript" src="../../js/HtmlBox_4.0/htmlbox.colors.js" type="text/javascript"></script>
<script language="Javascript" src="../../js/HtmlBox_4.0/xhtml.js" type="text/javascript"></script>
<!-- 
<script language="Javascript" src="../../js/HtmlBox_4.0/htmlbox.styles.js" type="text/javascript"></script>
<script language="Javascript" src="../../js/HtmlBox_4.0/htmlbox.syntax.js" type="text/javascript"></script>
<script language="Javascript" src="../../js/HtmlBox_4.0/htmlbox.min.js" type="text/javascript"></script>
-->

<link href="../css/main.css" rel="stylesheet" type="text/css" >
<script type="text/javascript">
function recommendTitle(title){
	$("#title").val(title);
}
</script>	
</head>
<body class="font14">
<table width="100%">
	<tr>
		<td valign="top"  width="200px">
			<%@include file="productAddStep1.jsp" %>
			<script type="text/javascript">
			$(function(){
				$("#productAddStep_3>a").css("color","red");
			}); 
			$("#productAddStep_3>a").css("color","red");
			</script>			
		</td>
		<td valign="top"  width="600px">
				<s:if test="#attr.result!=null">
					<table class="table1" width="100%" cellpadding="0" cellspacing="0" >	
						<thead>
							<tr style="background-color: #DEE9FB; color: #15428B;">
								<td align="center">
									<strong>操作结果</strong>
								</td>
							</tr>
						</thead> 
						<tr>
							<td><font color="red"><s:property value="#attr.result"/></font>	</td>
						</tr>
					</table>
					<br/> 
				</s:if> 		
			<s:form id="formProductDetail" name="formProductDetail" action="product!addDetail.action" method="post" namespace="/admin123/product" theme="simple">
			<table class="table1" align="center" width="100%" cellpadding="0" cellspacing="0" >
				<thead>
					<tr style="background-color: #DEE9FB; color: #15428B;">
						<td align="center">
							<strong>商品详细信息管理</strong>
							<input type="hidden" name="productId" value="${param.productId}" size="4">
							<input type="hidden" name=productDetailId value="${param.productDetailId}" size="4">
						</td>
					</tr>
				</thead>
				<tbody>
					<tr>	
						<td>
							<strong>标题:</strong>
							<input type="text" name="title" id="title" value="${productDetailDto.title}" maxlength="100"> 
							推荐标题:
							<a href="javascript:void(0);" onclick="javascript:recommendTitle('商品介绍');">商品介绍</a>
							<a href="javascript:void(0);" onclick="javascript:recommendTitle('规格参数');">规格参数</a>
							<a href="javascript:void(0);" onclick="javascript:recommendTitle('包装清单');">包装清单</a>
						</td>
					</tr> 
					<tr>	
						<td>
						
							<strong>内容:</strong>
							(
								<a onclick="window.parent.Open('在线编辑器推荐1','http://www.ostools.net/jsbin/vdhxtzeg/2')" href="javascript:void(0);">
									在线编辑器推荐1</a>；
								<a onclick="window.parent.Open('在线编辑器推荐2','http://www.ewebeditor.net/demo/?style=standard600&skin=office2003')" href="javascript:void(0);">
									在线编辑器推荐2</a>；
							)
							<br/>
							<textarea 
								id="mytextbox"
								name="description" 
								style="width: 580px; height: 500px;" maxlength="1000">${productDetailDto.description}</textarea>
							<script type="text/javascript">
								$("#mytextbox").htmlbox({
								    toolbars:[
								      	    [
								      		// Cut, Copy, Paste
								      		"cut","copy","paste",
								      		// Undo, Redo
								      		"undo","redo",
								      		// Bold, Italic, Underline, Strikethrough, Sup, Sub
								      		"bold","italic","underline","strike","sup","sub",
								      		// Left, Right, Center, Justify
								      		"justify","left","center","right",
								      		// Ordered List, Unordered List, Indent, Outdent
								      		"ol","ul","indent","outdent",
								      		// Hyperlink, Remove Hyperlink, Image
								      		"link","unlink","image"
								      		],
								      		// Formats, Font size, Font family, Font color, Font, Background
								      		["formats","fontsize","fontfamily","fontcolor"],
								      		[
											//Show code
											"code",
								      		//Strip tags
								      		"removeformat","striptags","hr","paragraph",
								      		// Styles, Source code syntax buttons
								      		"separator","quote","highlight"
								      		]
								      	],
								      	skin:"blue"
								      });
								      </script>
						</td>
					</tr> 
				</tbody>
				<tfoot style="border-top: 1px solid #DEE9FB;">
					<tr>
						<td align="center" style="border-top: 1px solid #DEE9FB;">
							<input type="button" value="添加"  onclick="document.formProductDetail.submit();this.disabled='disabled';">
							&nbsp;&nbsp;
							<input type="button" id="editProductPropertyBtn" value="编辑" onclick="javascript:editProductDetail();">
							<script type="text/javascript">
							function editProductDetail(){
								$('#formProductDetail').attr('action','product!editDetail.action');
							    $('#editProductPropertyBtn').val('处理中..');
							    $("#editProductPropertyBtn").attr({"disabled":"disabled"});
								$('#formProductDetail').submit();
							}
							</script>
						</td>
					</tr>
				</tfoot>
			</table>
			</s:form>
		</td>
		<td valign="top"  >
			<jsp:include page="productInfo.jsp">
				<jsp:param name="productId" value="${param.productId}"/>
			</jsp:include>
		</td>
	</tr>
</table>

</body>
</html>